package hu.bme.gabor.onlab.db;


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DbHelper extends SQLiteOpenHelper {
	public Context _context;

	public DbHelper(Context context, String name) {
		super(context, name, null, DbConstants.DATABASE_VERSION);
		_context = context;
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(DbConstants.DATABASE_CREATE_ALL);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL(DbConstants.DATABASE_DROP_ALL);
		db.execSQL(DbConstants.DATABASE_CREATE_ALL);
	}
}